package com.study.reactor.rxjava;

import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.schedulers.Schedulers;
import org.junit.Test;

public class MoreThread {


    @Test
    public void aa(){

        Observable.just("1","2").subscribeOn(Schedulers.newThread()).map(info->Integer.valueOf(info)).subscribe(new Consumer<Integer>() {
            @Override
            public void accept(Integer integer) throws Throwable {
                System.out.println(integer+"==="+Thread.currentThread().getName());
            }
        });

    }
}
